
 package com.ami.kvm.jviewer.kvmpkts;
 
 import com.ami.kvm.jviewer.common.ISOCFrameHdr;
 import com.ami.kvm.jviewer.gui.FSFrame;
 import com.ami.kvm.jviewer.gui.FSMenuBar;
 import com.ami.kvm.jviewer.gui.JVFrame;
 import com.ami.kvm.jviewer.gui.JVMenu;
 import com.ami.kvm.jviewer.gui.JViewerApp;
 import com.ami.kvm.jviewer.gui.JViewerView;
 import com.ami.kvm.jviewer.gui.JViewerView.RCMouseListener;
 import com.ami.kvm.jviewer.gui.LocaleStrings;
 import java.awt.Point;
 import java.awt.Robot;
 import java.math.BigDecimal;
 import java.util.TimerTask;
 import javax.swing.JLabel;
 import javax.swing.JScrollBar;
 import javax.swing.JScrollPane;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 class FrameRateTask
   extends TimerTask
 {
   Point viewPoint;
   static int flip = 0; static int right = 1; static int top = 1;
   
 
 
 
   public FrameRateTask()
   {
     this.viewPoint = Mousecaliberation.getViewPoint();
     Mousecaliberation.i = this.viewPoint.x;
     Mousecaliberation.j = this.viewPoint.y;
   }
   
   public void run()
   {
     if (!JViewerView.Lost_focus_flag)
     {
       int i = JViewerApp.getInstance().getSocframeHdr().getheight();
       int j = JViewerApp.getInstance().getSocframeHdr().getheight();
       
 
 
       if (JViewerApp.getInstance().isFullScreenMode()) {
         JViewerApp.getInstance().getM_fsFrame().getM_menuBar().setIDLabel(LocaleStrings.getString("3_6_MC") + " - " + JViewerView.MOUSE_ACCELERATION + "  :  " + LocaleStrings.getString("3_7_MC") + " - " + JViewerView.ACCEL_THRESHOLD);
       }
       else
       {
         JViewerApp.getInstance().getJVMenu().menu_string.setText("***" + LocaleStrings.getString("3_6_MC") + " " + LocaleStrings.getString("3_8_MC") + "*** " + LocaleStrings.getString("3_6_MC") + " : " + JViewerView.MOUSE_ACCELERATION + "   " + LocaleStrings.getString("3_7_MC") + " : " + JViewerView.ACCEL_THRESHOLD + "    ");
       }
       
 
 
 
       float f1 = JViewerView.ACCEL_THRESHOLD * JViewerView.MOUSE_ACCELERATION;
       float f2 = JViewerView.ACCEL_THRESHOLD * JViewerView.MOUSE_ACCELERATION;
       
       BigDecimal localBigDecimal1 = new BigDecimal(f1);
       BigDecimal localBigDecimal2;
       if (f1 % 1.0F >= 0.5D)
       {
         localBigDecimal2 = localBigDecimal1.setScale(0, 4);
       }
       else
       {
         localBigDecimal2 = localBigDecimal1.setScale(0, 5);
       }
       f1 = localBigDecimal2.floatValue();
       
       localBigDecimal1 = new BigDecimal(f2);
       if (f2 % 1.0F >= 0.5D)
       {
         localBigDecimal2 = localBigDecimal1.setScale(0, 4);
       }
       else
       {
         localBigDecimal2 = localBigDecimal1.setScale(0, 5);
       }
       f2 = localBigDecimal2.floatValue();
       
       Mousecaliberation.i += (int)f1;
       Mousecaliberation.j += (int)f2;
       int k;
       int m; if (JViewerApp.getInstance().isFullScreenMode()) {
         k = JViewerApp.getInstance().getRCView().getHeight();
         m = JViewerApp.getInstance().getRCView().getWidth();
       }
       else {
         k = JViewerApp.getInstance().getMainWindow().getM_viewSP().getHeight();
         m = JViewerApp.getInstance().getRCView().getWidth();
       }
       if ((Mousecaliberation.j > i) || (Mousecaliberation.j > k) || (Mousecaliberation.i > m))
       {
         if (!JViewerView.Lost_focus_flag)
         {
           int n = JViewerApp.getInstance().getMainWindow().getM_viewSP().getHorizontalScrollBar().getValue() - j;
           int i1 = JViewerApp.getInstance().getMainWindow().getM_viewSP().getVerticalScrollBar().getValue() - i;
           JViewerApp.getInstance().getRCView().mouseListener.splitandsend(n, i1, true);
           Mousecaliberation.robbie.mouseMove(this.viewPoint.x + 1, this.viewPoint.y + 1);
           Mousecaliberation.i = this.viewPoint.x + 1;
           Mousecaliberation.j = this.viewPoint.y + 1;
         }
       }
       Mousecaliberation.robbie.mouseMove(Mousecaliberation.i, Mousecaliberation.j);
       JViewerApp.getInstance().getRCView().mouseListener.splitandsend(JViewerView.ACCEL_THRESHOLD, JViewerView.ACCEL_THRESHOLD, true);
     }
   }
 }


/* Location:              D:\Users\tianlin\Downloads\JViewer.jar!\com\ami\kvm\jviewer\kvmpkts\FrameRateTask.class
 * Java compiler version: 5 (49.0)
 * JD-Core Version:       0.7.1
 */